Big Move Finder Outlier ZoneA way to find if price made a big move in a user input given amount of time ago. If it made a move more than the given percent amount, a colored zone will be placed until a given amount of length finishes taking place, and then it will stop coloring the zone. This helps filter out or find stocks that are making or have made too big a price move or were too volatile in the past.
[i]price
GBTC premium as a percentage of the bitcoin pricePlots the GBTC premium as a percentage of the bitcoin price at the close. It also includes the annual management fee (2% at the moment). It accrues on a daily, weekly or monthly basis depending on the chart resolution. (intraday not supported) The amount of bitcoin per gbtc share and the annual fee may be changed by Grayscale in the future. Those values can be easily update in the script settings.
Price PredictorGreetings Traders! I have decided to release a few scripts as open-source as I'm sure others can benefit from them and perhaps make them better.(Be sure to check my Profile for the other scripts as well: www.tradingview.com).
This one is called Price Predictor.
How To Use Price Predictor
Price Predictor acquires potential targets by measuring the Average Change of Price from a user-defined resolution, from Open to Open. By default, the Resolution is set to 1 Day, however you can play around with Weekly, Monthly, etc. When a new resolution period begins, Price Predictor will automatically adjust based on the new Average Change of Price.
Due to the avoidance of Security() in this script, you may have to play around with the Timeframe that you use it in to ensure that you have enough bars on your chart to process the User-Defined Resolution.
The first Target Zone represents Target 5 of my other script, Trade Manager()(Given that you set the Target Multiple and Default Threshold Inputs as the same in each script), and is the most likely to be hit before the end of the resolution period.
In addition to a User-Defined Resolution, you also have the option of using a Custom Price to define Target Zones, however I'd recommend using my other script, Trade Manager(), if the volatility of the Instrument isn't too high.
I wanted to give a Special Thanks to @Pinecoders for the Custom RoundToTick Function from The Backtesting/Trading Engine --> (
If you like Price Predictor, be sure to Like, Follow, and if you have any questions, don't be afraid to drop a comment below.
Trade ManagerGreetings Traders! I have decided to release a few scripts as open-source as I'm sure others can benefit from them and perhaps make them better.(Be sure to check my Profile for the other scripts as well: www.tradingview.com).
This one is called Trade Manager.
How To Use Trade Manager
Trade Manager acquires potential targets by measuring the Average Change of Price from a user-defined resolution, from Open to Open. By default, the Resolution is set to 1 Day, however you can play around with Weekly, Monthly, etc. When a new resolution period begins, Trade Manager will automatically adjust its Targets based on the new Average Change of Price.
Due to the avoidance of Security() in this script, you may have to play around with the Timeframe that you use it in to ensure that you have enough bars on your chart to process the User-Defined Resolution.
The idea behind Trade Manager is quite simple yet can be quite powerful at the same time. Consider a Daily Candle for example. You can clearly see how a vast amount of price movement can be encapsulated within it, sometimes in both directions. By measuring the Average Change of Price per day(From Open to Open), we can use this Average to build targets off of. Defining a small Threshold above and below the Open Price of the Daily Candle allows you to set Limit Orders at these levels with predefined Targets. Then, the use of the custom Trailing Stop and Break Even helps to secure profits without giving too much back to the market, all while managing your risk.
Within the Settings of Trade Manager, you have the option to alter the logic of whether Break-Even is set after the first Target or second Target is hit.
In addition to using a User-Defined Resolution Period, you can also input a Custom Price into the settings of Trade Manager and allow the Targets, Trailing Stop, and Break Even to be calculated from the Custom Price.
I wanted to give a Special Thanks to @PineCoders for the Custom RoundToTick Function from The Backtesting/Trading Engine --> ()
As a note, there are times where price will break out very strongly from the Limit Price, sometimes crossing the Stop and Limit Price on the same bar. When this happens, it is difficult for Pine to determine which occurred first intra-bar, and as a result, it does not record a new position. In these instances, I'd recommend adjusting the Default Stop Multiple so it is below the bar.
If you like Trade Manager, be sure to Like, Follow, and if you have any questions, don't be afraid to drop a comment below.
FAIR P/E BASED ON INTEREST RATESJust a different way to view S&P 500 valuations versus the standard look of looking at raw PE. Current yield of the 10 Year Bonds are used to calculate a fair value for the SPX.
This is a methodology that Buffett uses to measure value.
Recommend turning off most plots and just plotting PE and/or PE10 percent difference only.
The "slope and intercept" inputs should be left alone unless you recalculate them with updated data.
The "current PE and PE10" inputs can be found here: www.multpl.com This is a daily estimated value.
The full calculated value is released once per month, and is what Quandl has. Change these numbers if you want today's updated values.
Once you have the study set up the way you want, I recommend saving the defaults (bottom left corner in the settings screen).
Difference In PriceWith the difference in price indicator, you can view price change volatility. Specifically, you can view the difference in price for a single candle segment, at any desired candlestick timeframe. This simply takes the sessions high minus the low and gives the difference. Difference in price trend lines help determine if a stock has a history of high volatility or not. This is useful for those looking to invest in stable stocks.
Market EmotionsThis is a simple and fun indicator I built out of boredom one night. It's great for a quick laugh, but other than that, it's useless. It simply displays emotes for various thresholds of change in price between the open and close of a candle. For example, unicorn candles are any candles that gain 25% or more from opening price to closing price.
Price/Volume Value HistogramAn interesting implementation of mine to measure an asset changes based on asset price velocity and volume velocity. The indicator acts as asset value calculator. Long and Short.
==Points System Rules==
UPTRENDING
If Current Close is higher than previous Close and Current Volume is bigger than previous Volume: Adds Close Points and Volume Points
Otherwise check
If Current Close is higher than previous Close: Adds Only Close Points
DOWNTRENDING
If Current Close is lower than previous Close and Current Volume is bigger than previous Volume: Reduces Close Points and Volume Points
Otherwise check
If Current Close is lower than previous Close: Reduces Only Close Points
==Plotting==
Result of the values are summed up to a histogram.
Obviously on increasing prices and volume the histogram will be above zero line and on the Bullish side (green color), otherwise, on the Bearish side (red color).
You can't cheat the price movement, it's just what it is.
Optional to smooth it by EMA (set to true by default).
Like if you Like and Enjoy!
Follow for upcoming indicators.
Rise from All Time LowThis very simple script lets you see how much the asset rose from the All Time Low (ATL).
First, the ATL is calculated and plotted. Then, we measure the distance from ATL and current bar close.
Two labels are plotted :
ATL label
Current close label with rise and rise
It can be useful for penny stocks trading when you want to buy lows but must see how much the price rose last bars to improve entries.
For example, SQBG is actually "only" at x 1.85 from ATL (not an advice in investment) :
If you have ideas to complete or improve this script, let me know in comments ;)
Renko MTF - Traditional and ATRSomehow there aren't too many renko bars that have the traditional setting built-in so I put one up. This one has the option to choose between Traditional and ATR, the size number corresponds to the option that was chosen. And just in case if anyone wanted, I put up a multi-time frame option to choose the time frame the bars take place. D is for day, W is for week, flat numbers are in minutes, and leaving it blank looks at the current time frame the chart is in. The calculation comes from how Tradingview handles renko bars.
Renko bars don't paint a color unless the market moves a certain amount based on its settings. When the market moves up it turns green, if it moves down it turns red, simple color changes alone can say a lot. They're a good way to try to find trends somewhat objectively and seem to be a good way to eliminate time and can replace other time-based indicators that can whipsaw or lag. The bars have a tendency to repeat themselves so it's a good way to find trends. There aren't too many settings for the box size, most people either just choose 5, 10, 14, etc where as other indicators have many options that differ on different markets. The numbers can be chosen easily enough to pick a sweet spot with just a single input where other indicators such as MACD have multiple inputs to pick the right number that can make it difficult to choose from(although it won't be as precise as a MACD would sometimes but can be worth the objectiveness and consistency and same setting repeatability in different markets in my opinion). Some example strategies could be to use them as an alternative trailing stop, finding trends, a simple color change for entry and exit on top of other strategies, etc. It can do the job of many in an all in one price action type indicator(although not better all the time, it can come close enough). Despite all this, it does seem to depend on which time-frame it's being looked at, how TV does the calculation for it, and how one can use this with the lack of practical information on it out there.
ATR TRex [ipooya]To appreciate dear Mr.Khakestar efforts I have converted his mt4 ATR formula to pine script. All credits go to him.
you can view the ATR result of each candle in the past:
The first black number is the ATR of the M1 chart.
The second black number is the ATR of the M5chart.
The third black number is the ATR of the M15 chart.
The fourth black number is the ATR of the H1 chart.
The fifth black number is the ATR of the H4 chart.
The sixth black number is the ATR of the Daily chart.
The seventh black number is the ATR of the Weekly chart.
**and the second number of every line is live ATR ( current ATR candle)
What makes this ATR formula so different?
This formula invented by Mr.Khakestar and it shows the power of the price to move in each cycle of the chart. We can use it in RTM strategy and Price Action trading. To learn how to use it you need to learn TRex strategy (Presented by Mr.Khakestart for free in Persian).
Backwards price projection - few bars ahead reverse chartEver wondered what the chart would look like if it's flipped upside down and flipped horizontally into the future? The idea is that when there is a trend, a repeating pattern tends to occur. Going backwards and projecting that movement into the future can supposedly show what the future price will be.
Somehow I haven't found anyone try it like this and I am currently trying to find a way to use a reversed moving average or plot of some kind to project further ahead. TV at the moment does not allow offsets on candle plot(as far as I know) and I am only allowed a certain number of plots to go on the chart, so I put as many price moves ahead as I could to project the future price. It's a bit sloppy with all those forced plots but it gets the job done. I'll see if I can improve it with a moving average or something and possibly make a strategy out of it in the future.
[blackcat] L2 Price Envelope TrackerLevel: 2
Background
Price envelopes sare shown at a set percentage above and below a moving average. They are used to indicate overbought and oversold levels and can be traded individually or in conjunction with a momentum indicator.
Function
L2 Price Envelope Tracker is an innovative indicator that use customized envelope of price to disclose overbought and oversold periods. With this function, long and short entries can be further developped in this pine script.
Key Signal
sma5 --> typical price moving average line
resistance --> upper envelope as resistance line
support ---> lower envelope as support line
Pros and Cons
Pros:
1. easy observe overbought and oversold zone
2. disclose exact long and short entries in overbought and oversold zones
Cons:
1. Only applicable for the trading pairs that support financial() functions. crypto/xau/xag/indice are not applicable
2. Need to tune r1 and s1 for different trading pairs
Remarks
NA
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Moving Average of Upper and Lower Wicks with optional smoothingIn the book, The New Technical Trader by Tushar Chande and Stanley Kroll there is a part that talks about candlestick analysis and how the wicks play a role on how the price will behave. When wick lengths increase then there could be uncertainty. Weakening of support and resistance levels can also be seen by the size of the candlestick wicks or shadows. Shoutouts to Mango2Juice from Tradingview and the The Academy of Forex for helping me out in making this and providing the moving averages function.
When combined with other indicators or strategies, I find that this increases their accuracy when used correctly. For those that believe in price action, this might be worth a try. The book has only a brief section on candlestick wicks but it is one of the most interesting ideas I found. The book likes to include a simple moving average in its indicators with a certain length to provide a smoothing type of effect or a sort of extra indicator for the other to be above to give off quicker signals at the cost of accuracy. For this indicator it acts as a smoothing type effect which I put in because it is hard to see the slope and direction of where the moving averages of the wicks are going. The type of moving averages to use and the correct lengths are questionable and are not explained well in the book. If anyone can figure out a good use for this or know better settings or tips, please let me know.
LER - Law of Effort vs ResultsLaw of Effort vs Results is a tool to find the price changes based on volume.
This tool shows that if there is a high volume occur but the price has small difference in one candle, this will trigger a 'spike'. This spike represents that a high activity has occurred but the price did not reflect as the volume changes.
The analogy of this tool can be represented as we drive a car on a steep hill: despite we hit the gas harder, the car just slightly move higher.
Position CalculatorThis script calculates how much cryptos or dollars you have to bet with 4 variables : Risk Loss , Leverage, Entry and Stop Loss.
When you want to open a position, just complete the parameters and the script will tell you how much you have to bet in dollars or cryptos units, depending the way you're trading.
Note : don't foreget that you have to pay fees on exchanges whose are not included here, specially with high leverage trades.
Fast ROI checker 50% Gann RetracementThis script is based on the Gann's 50% Retracement rule.
First, the ATH (All Time High) and ATL (All Time Low) are calculated; then, the 50% retracement level is found.
With this 50% level, we'll calculate the maximum price entry to keep a ROI which is set in the parameters.
For exemple, I only want to buy assets which can make a x16 before the 50% retracement , the script will calculate the maximum entry to respect this ROI .
If the Max entry price is above the ATL , the line will be green; if not, the line will be red.
To faster the search in the watchlist, when the price is between the Max Entry line and the ATL line, the background is painted in green.
It's not an investment strategy, you have to find your proper indicators to make purchases.
Enjoy !
Slippage Calculator Hello everyone,
This is the first script I publish, also my English is not the best my apologies.
This simple study script is an attempt to estimate the slippage during a trade. By no means it is a precise calculation, it is just an approach that can be improved.
You are welcome to take this simple script and use it and change it at your convenience just ask your acknowledge.
My approach considers the total fluctuation the price gets as a consequence for the total volume on that specific bar.
The volume on each bar is given in BTC, thus you get that by using the formula.
vol = volume * vwap
The total variation in price is considered as twice the size of the bar plus the gap between to consecutive bars. that is the
total fluctuation of price on each bar = (2 * (high - low) + abs(open - close )) which is not totally true since inside each bar price can fluctuate a lot more.
The script considers you are trading your total equity (eq_BTC ) each time. The fraction of your equity of the volume bar is eq_BTC / vol
Then eq_BTC / vol is the portion or the total fluctuation in price that is due to your entry or exit from the market.
(2 * (high - low) + abs(open - close )) * eq_BTC / vol
is the average change in price due you enter o exit a position.
** the 2 factor accounts for the two directions in the market buying and selling. There is more behind this formula I can explain you in more detail if you like.
I haven't seen anywhere a formula like this one, so it is intended to be a first attempt to get a better approach.
Finally the output of the scripts is how many ticks the price might change due to your trade on each bar
round(slippage/syminfo.mintick)
The script is focused in crypto but it can be used as well on forex markets.
Take care,
@yvponce
3 MA w price slope The MA is indicating historical cost on the market.
This script will help you observe MA with price and slope.
This stript is inspired by LEI & LoneCapital.
All thanks to LEI.
Graham FormulaThis is an Tradingview implementation of the Grahams Formula as described in Benjamin Grahams book "The Intelligent Investor".
In theory this can be used to screen for over- and undervalued stocks, however as Graham himself notes, you should look into other fundamentals when using them in conjunction with Grahams formula.
Earthquake Effect by DGTInstitutional investors have a profound impact on financial instruments prices because of the large volume, and their trading activities can greatly impact the price of financial instruments. They sometimes may split trades over time in order to not make a material impact and of course not to decrease liquidity to the point where there may be no one to take the other side of the trade.
Institutional investors (Smart Money) may create an Elephant Effect on the prices of financial instruments, and this study aims to display by emphasizing high volume changes
In the memory of the North Anatolian Earthquake that struck on August 17, 1999, that we remember with pain today, and similarities of plotting outcomes to seismograph plotting I preferred to name this study as Earthquake Effect (SEISMOGRAPH)
Disclaimer:
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Buy Any Bar By ChenycoBuys amount of shares by bars with specified amount of money (100$ for a month bar for example).
Including commissions.